package com.zg.nacos.sys;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import org.apache.commons.lang.StringUtils;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/6/28 9:27
 */

@Getter
@AllArgsConstructor
public enum ActiveStatusEnum {

    //开票系统
    PRE(0,"待运行"),
    ACTIVE(1,"已运行"),
    OFF(2,"已下线");

    private  Integer code;
    private  String title;

    public static String getNameByCode(Integer code) {
        if (null != code) {
            for (ActiveStatusEnum enumItem : ActiveStatusEnum.values()) {
                if (enumItem.getCode().equals(code)) {
                    return enumItem.title;
                }
            }
        }
        return "";
    }
}
